import {BasicColumn, FormSchema} from '/@/components/Table';
import {rules} from '/@/utils/helper/validator';

export const columns: BasicColumn[] = [
  {
    title: 'id',
    dataIndex: 'id',
    width: 150,
    defaultHidden: true
  },
  {
    title: '域名',
    dataIndex: 'domain',
    width: 200,
    align: 'left',
  },

  {
    title: '创建者',
    dataIndex: 'createdBy',
    width: 100,
  },

  {
    title: '创建时间',
    dataIndex: 'createdAt',
    width: 150,
  },
 
  {
    title: '更新时间',
    dataIndex: 'updatedAt',
    width: 150,
  }
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'domain',
    label: '域名',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: 'id',
    component: 'Input',
    show: false,
  },
  {
    field: 'domain',
    label: '域名',
    component: 'Input',
    rules: rules.rule('http', true),
    required: true,
  }
]
